package com.rgp.internalcommon.utils;

/**
 * @author nhp
 * @version 1.0
 * @description TODO
 * @date 2024-04-12 22:35
 */
public class NameGenerateUtils {

    private static final Integer RANDOM_NAME_LENGTH = 8;
    private static final String str = "abcdefghijklmnopqrstuvwxyz";

    public static String getRandomName(){
        char[] chars = str.toCharArray();
        char[] result = new char[RANDOM_NAME_LENGTH];
        for (int i = 0;i < RANDOM_NAME_LENGTH;i++){
            result[i] = chars[(int)(Math.random() * 26)];
        }
        return new String(result);
    }
}
